fix(runtime): enable SSR remote-entry retry and URL failover - #4968
fix(runtime): enable SSR remote-entry retry and URL failover#4968dmchoi77 wants to merge 3 commits into
Conversation
🦋 Changeset detectedLatest commit: 108c924 The changes in this PR will be included in the next version bump. This PR includes changesets to release 47 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 13639e3681
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Thanks for adding Node.js SSR remote-entry retry support. The overall direction looks good, but I found a few retry edge cases that should be addressed before merging.
For example: remoteEntry -> chunk-a -> chunk-b If the first fetch of ERR_VM_MODULE_LINK_FAILURE: request for './chunk-a.mjs' resolved to an errored module The error is then reclassified as
Once Could
A failure from I verified that the existing SDK/runtime-core tests and builds pass. The additional ESM cache and execution-error-during-retry cases above both reproduce consistently. |
|
@2heal1 Thanks for the detailed review. I addressed all three retry edge cases:
|
Description
This PR fixes Node.js/SSR remote-entry transport failures that currently bypass the
loadEntryErrorlifecycle.loadEntryNodenow follows the same retryableRUNTIME_008path as the browser loader, and the Node loader receivesgetEntryUrlso retry-plugin URL rewrites (domain failover and cache-busting queries) are applied during SSR as well.Remote-entry execution failures remain non-retryable. The Node SDK now marks transport failures as
ScriptNetworkErrorand execution failures asScriptExecutionError; hook/configuration failures retain their original errors.The change reuses the existing runtime error lifecycle and browser error handling pattern. No new public utility or retry API is introduced.
Regression coverage verifies:
loadEntryErrorand can recover with a rewritten URL.RUNTIME_008.createScripthook failures are not misclassified as network failures.Validation
All commands below were run with Node.js
24.19.0and pnpm10.28.0:Related Issue
Closes #4963
Types of changes
Checklist